package com.kexuexiong.demo.common.feignProvider.baseService.file;

import com.kexuexiong.demo.common.dto.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@FeignClient(name = "bearBase-web", path = "bearBase", contextId = "bearBaseWebFileFeignClient")
public interface FileFeignClient {

    @RequestMapping(value = "/file/uploadFile", method = {RequestMethod.POST}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result uploadFile(@RequestPart("file") MultipartFile file) throws IOException;
}
